<template>
<div class="app">
  <h2>info: {{name}}-{{age}}-{{height}}</h2>
  <button v-on:click="age++">修改age</button>
  <button @="{click:()=>{height=1.89}}">修改height</button>
</div>
</template>

<script>
import {reactive, toRef, toRefs} from "vue";

export default {
  name: "App",
  setup(){
    const info=reactive({
      name:'why',
      age:19,
      height:1.88
    })

    const {name,age} = toRefs(info)

    const height=toRef(info,'height')
    return{
      name,
      age,
      height
    }

  }
}
</script>

<style scoped>

</style>